﻿using BootstrapBlazor.Components;
using BootstrapBlazorApp.Shared.Data.SYS.Base;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;

namespace BootstrapBlazorApp.Shared.Data.SYS
{
    public class UserRoleDto : BaseDto
    {
        /// <summary>
        /// 账号
        /// </summary>
        [Display(Name = "账号")]
        [AutoGenerateColumn(IsReadonlyWhenEdit = true, Searchable = true, Filterable = true)]
        [Required(ErrorMessage = "账号名称不能为空")]
        public string? Account { get; set; }

        /// <summary>
        /// 姓名不能为空
        /// </summary>
        [Display(Name = "姓名")]
        [AutoGenerateColumn(Searchable = true, Editable = false, Filterable = true)]
        public string? AccountName { get; set; }

        [Display(Name = "角色编码")]
        [Required(ErrorMessage = "角色编码是必填的")]
        [AutoGenerateColumn(IsReadonlyWhenEdit = true, Searchable = true, Filterable = true)]
        public string RoleCode { get; set; }

        [Display(Name = "角色名称")]
        [AutoGenerateColumn(Searchable = true, Editable = false, Filterable = true)]
        public string RoleName { get; set; }

    }
}
